package dnufractal;

public class Main {
  public static void main(String[] args) {
    System.out.println("First parameter is file name.");
    System.out.println("Second parameter is delta (error of compression).");
    System.out.println("Compessed file has same name but .frc extension.");
    System.out.println("To uncompess use only first parameter (file name).");
    tcmpr cmpr=new tcmpr();
//    cmpr.openfile("brblacksmall.bmp"); cmpr.cmp(30); cmpr.tofile("result.frc");
    cmpr.frfile("result.frc");cmpr.ucmp(128);cmpr.savefile("brblack30.bmp");
//    cmpr.frfile("result.frc");cmpr.cntblk.msht(4);cmpr.ucmp(512);cmpr.savefile("brblack1.bmp");
    if(args.length==0)return;
    if(args.length>=2){
      cmpr.openfile(args[0]);
      cmpr.cmp(Double.valueOf(args[1]));
      cmpr.tofile("result.frc");
    }
  }
}
